<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多功能按钮</title>
    <link rel="stylesheet" href="./assets/fonts/iconfont.css" />
    <style>
        *{
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }
        body{
            background-color: #161724;
            min-height: 100vh;
        }
        #app{
            min-height: 100vh;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .container{
            position: relative;
            width: 70px;
            height: 70px;
            background-color: #1D212B;
            border-radius: 7px;
            transition: 0.5s;
            display: flex;
            align-items: center;
            justify-content: center;
            transition-delay: calc(0.2s * 9);
        }
        
        .container.active{
            width: 200px;
            height: 200px;
            transition-delay: 0s;
           
        }
        .container span{
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 8px;
            height: 8px;
            background-color: #fff;
            border-radius: 50%;
            transform: translate(calc(12px * var(--x)),calc(12px * var(--y)));
            transition: transform .5s ,width .5s,height .5s, background .5s;
            transition-delay: calc(0.2s * var(--i));
            
        }
        .container.active span{
            height: 50px;
            width: 50px;
            transform: translate(calc(60px * var(--x)),calc(60px * var(--y)));
            background-color: #333849;
            &:hover i{
                color: #2dfc52;
                filter: drop-shadow(0 0 2px #2dfc52);
                cursor: pointer;
            }

        }
        .container span i{
            color: #fff;
            font-size: 0;
            transition: font-size .5s;
            transition-delay: calc(0.2s * var(--i));

        }
        .container.active span i{
            font-size: 1.35em;
           
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="container">
            <span style="--i:1;--x:-1;--y:-1">
                <i class="iconfont icon-aislogo" style="--i:1"></i>
            </span>
            <span style="--i:2;--x:1;--y:1">
                <i class="iconfont icon-fuhao-yuyue" style="--i:2"></i>

            </span>
            <span style="--i:3;--x:1;--y:-1">
                <i class="iconfont icon-code" style="--i:3"></i>

            </span>
            <span style="--i:4;--x:-1;--y:1">
                <i class="iconfont icon-weibiaoti--" style="--i:4"></i>

            </span>
            <span style="--i:5;--x:-1;--y:0">
                <i class="iconfont icon-yinpin" style="--i:5"></i>

            </span>
            <span style="--i:6;--x:0;--y:-1">
                <i class="iconfont icon-shipin" style="--i:6"></i>

            </span>
            <span style="--i:7;--x:1;--y:0">
                <i class="iconfont icon-shezhi" style="--i:7"></i>

            </span>
            <span style="--i:8;--x:0;--y:1">
                <i class="iconfont icon-wode" style="--i:8"></i>

            </span>
            <span style="--i:9;--x:0;--y:0">
                <i class="iconfont icon-yingyong" style="--i:9"></i>

            </span>
        </div>
    </div>
    <script>
        const container = document.querySelector('.container')
        container.addEventListener('click',function(){
            if(container.className === 'container active'){
                container.className = `container`
            }else{
                container.className = `container active`
            }
        })
    </script>
</body>
</html>